<%@page import="com.gao.domain.Product"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<!--引入Bootstrap资源-->
<!-- 新 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/details.css" />
<!-- 可选的Bootstrap主题文件（一般不用引入） -->
<link rel="stylesheet" href="css/bootstrap-theme.css">
<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="js/jquery-1.11.3.js"></script>
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="js/bootstrap.js"></script>
<script type="text/javascript" src="js/detail.js"></script>
</head>
<body>
	<!--top bar制作-->
	<nav class="navbar navbar-default" role="navigation">
	<div class="container-fluid">
		<!-- Brand and toggle get grouped for better mobile display -->
		<div class="navbar-header">
			<button type="button" class="navbar-toggle collapsed"
				data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
				<span class="sr-only">Toggle navigation</span> <span
					class="icon-bar"></span> <span class="icon-bar"></span> <span
					class="icon-bar"></span>
			</button>
			<!-- <a class="navbar-brand" href="#"><img src="img/logo.png" height="30px"/></a>-->
		</div>

		<!-- Collect the nav links, forms, and other content for toggling -->
		<div class="collapse navbar-collapse"
			id="bs-example-navbar-collapse-1">
			<ul class="nav navbar-nav">
				<li class="active"><a href="ProductsIndexServlet">小米商城</a></li>
				<li><a href="#">米聊</a></li>
				<li><a href="#">游戏</a></li>
				<li><a href="#">多看阅读</a></li>
				<li><a href="#">云服务</a></li>
				<li><a href="#">米聊</a></li>
			</ul>
			<ul class="nav navbar-nav navbar-right">
			 	<li><a href="login.jsp">登录</a></li>
		        <li><a href="register.jsp">注册</a></li>
				<li><a href="#">消息通知</a></li>
				<li><a href="CartDetailServlet">购物车</a></li>

			</ul>
		</div>
		<!-- /.navbar-collapse -->
	</div>
	<!-- /.container-fluid --> </nav>
	<!--详情的主体-->
	<div class="row">
		<% Product product = (Product)request.getAttribute("product"); %>
		<div class="col-md-4 col-md-offset-2">
			<img src="img/product/<%=product.getImg() %>" />
		</div>
		<div class="col-md-4">
			<br />
			<form action="CartAddServlet" method="post">
				<input type="hidden" name="pid" value="<%=product.getPid() %>"/>
				<input type="hidden" name="name" value="<%=product.getName() %>"/>
				<input type="hidden" name="price" value="<%=product.getPrice() %>"/>
				<input type="hidden" name="img" value="<%=product.getImg() %>"/>
				<h2><%=product.getName() %></h2>
				价格:￥<%=product.getPrice() %><br /> 服务说明 全场免运费 | 由小米商城负责发货，并提供售后服务<br /> 
				产品编号：<%=product.getPid() %><br />
				<div id="addcar">
					<div id="addsubnum">
						<div>
							<input type="text" id="num" value="1" name="num" />
						</div>
						<div id="addsubfh">
							<div>
								<input type="button" id="add" value="+" onclick="addOne()" />
							</div>
							<div>
								<input type="button" id="sub" value="-" onclick="subOne()" />
							</div>
						</div>
					</div>
					<div id="addcarbutton">
						<br /> <input type="submit" value="加入购物车" id="addcarbtn"/> <input
							type="submit" value="立即下单 " id="ljxd" />
					</div>
				</div>
			</form>
		</div>
	</div>
	<!--底部设置-->
	<hr />
	<div class="row">
		<div class="col-md-6 col-md-offset-3">
			<div class="row">
				<div class="col-md-2 col-md-offset-1">预约维修服务</div>
				<div class="col-md-2">7天无理由退货</div>
				<div class="col-md-2">15天免费换货</div>
				<div class="col-md-2">520余家售后网点</div>
				<div class="col-md-2 ">满150元包邮</div>
			</div>
		</div>
	</div>
</body>
</html>
